import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import echarts from './views/charts/echarts'

/**
 * 店铺入驻
 */
import TenantRegister from './views/TenantRegister'

/**
 * 系统管理:
 *  系统配置
 *  租户管理
 *  部门管理
 *  员工管理
 */
import Sysconfig from './views/sysmanage/Sysconfig.vue'
import Tenant from "./views/sysmanage/Tenant";
import Employee from "./views/sysmanage/Employee"
import Department from "./views/sysmanage/Department";

let routes = [
    {
        path: '/login',
        component: Login,
        name: '登录',
        hidden: true
    },

    {
        path: '/tenantRegister',
        component: TenantRegister,
        name: '店铺入驻',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '错误页面',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '主页',
        iconCls: 'fa fa-bar-chart',
        leaf:true, //没有儿子
        children: [
            { path: '/echarts', component: echarts, name: '主页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/sysconfig', component: Sysconfig, name: '系统配置' },
            { path: '/tenant', component: Tenant, name: '租户管理' },
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/employee', component: Employee, name: '员工管理' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;